package es.usj.redes.smtp.utils;

public class Constants {
	/**
	 * Expresion para validar un email. Permitiendo caracteres alfanumericos antes y despues de la <i>@</i>
	 */
	public static final String REGEX_EMAIL = "^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,4})$";
	
	public static final String REGEX_EMAIL_BY_IP = 	"^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])$";
	
	/**
	 * 500 Syntax error, command unrecognized
	 */
	public static final String ERROR_500 = "500 Syntax error, command unrecognized";
	/**
	 * 501 Syntax error in parameters or arguments
	 */
	public static final String ERROR_501 = "501 Syntax error in parameters or arguments";
	/**
	 * 503 Bad sequence of commands
	 */
	public static final String ERROR_503 = "503 Bad sequence of commands";
	/**
	 * 554 Not valid recipients
	 */
	public static final String ERROR_554 = "554 Not valid recipients";
	/**
	 * 554 Relay Access Deny
	 */
	public static final String ERROR_554_RELAY_ACCESS_DENIED = "554 Relay access denied";
	/**
	 * Recipient address rejected: User unknown in virtual mailbox table
	 */
	public static final String ERROR_550 ="Recipient address rejected: User unknown in virtual mailbox table";
	/**
	 * OK Service Ready
	 */
	public static final String POP3_CLIENT_CONNECTION_ESTABLISHED_COMMAND = "+OK Service Ready.\r\n";
	/**
	 * STAT\r\n
	 */
	public static final String POP3_CLIENT_STAT_COMMAND = "STAT\r\n";
	/**
	 * LIST\r\n
	 */
	public static final String POP3_CLIENT_LIST_MESSAGES_COMMAND = "LIST\r\n";
	/**
	 * LIST
	 */
	public static final String POP3_CLIENT_LIST_MESSAGES_COMMAND2 = "LIST";
	/**
	 * DELE
	 */
	public static final String POP3_CLIENT_DELE_MESSAGE_COMMAND= "DELE";
	/**
	 * Host establecido en el archivo de propiedades.
	 */
	public static final String SMTP_SERVER_NAME = "Localhost";
	/**
	 * 220 "+{@link #SMTP_SERVER_NAME}+" \"Service Ready\"\\r\\n
	 */
	public static final String SMTP_SERVER_WELCOME = "220 "+SMTP_SERVER_NAME+" \"Service Ready\"\\r\\n";
	/**
	 * HELO {@link #SMTP_SERVER_NAME}
	 */
	public static final String SMTP_CLIENT_WELCOME = "HELO "+SMTP_SERVER_NAME+"\\r\\n";
	/**
	 * 250 \"Requested mail action okay, completed\
	 */
	public static final String SMTP_SERVER_WL_COMPLETED= "250 \"Requested mail action okay, completed\"\\r\\n";
	/**
	 * 250 OK
	 */
	public static final String SMTP_SERVER_EMAIL_OK = "250 OK\\r\\n";
	/**
	 * DATA
	 */
	public static final String SMTP_CLIENT_INIT_MAIL_DATA = "DATA\\r\\n";
	/**
	 * 354\"Start mail input; end with
	 */
	public static final String SMTP_SERVER_INIT_MAIL_DATA = "354 \"Start mail input; end with \\r\\n.\\r\\n\"";
	/**
	 * 221 "+{@link #SMTP_SERVER_NAME}+" Service closing transmission cannel
	 */
	public static final String SMTP_SERVER_CLOSE_CONNECTION = "221 "+SMTP_SERVER_NAME+" Service closing transmission cannel";
	/**
	 * QUIT
	 */
	public static final String SMTP_CLIENT_QUIT ="QUIT";
	
}
